package com.example.shopping2.a_a_mvp.model.models

import BaseModel
import com.example.perplonews.a_c_network.Api
import com.example.perplonews.a_c_network.ChangFunction
import com.example.shopping2.a_a_entity.BaseEntity
import com.example.shopping2.a_a_entity.TokenEntity
import com.example.shopping2.a_c_network.HttpFactory
import com.example.shopping2.a_c_network.HttpType
import com.example.shopping2.a_c_network.LjlUtils
import io.reactivex.Observable
import io.reactivex.functions.Function
import kotlin.math.log

class TokenModel : BaseModel(), Tokencontract.Token_MyModel {
    override fun requestToken(map: Map<String, Any>): Observable<BaseEntity> {
        return HttpFactory.getInstance().factory(HttpType.SIGNTYPE)
            .getRetrofit()
            .create(Api::class.java)
            .requestToken(createBody(map)!!)
            .map(ChangFunction<TokenEntity>())



    }

}